package chapter_3;

import java.util.Arrays;

public class Test7 {
    public static void main(String[] args) {
//        int[] arr = new int[]{5,2,1,6,8};
//        Arrays.sort(arr);
//        for (int i : arr) {
//            System.out.println(i);
//        }
//        int[] ints = Arrays.copyOf(arr, arr.length);
//        for (int anInt : ints) {
//            System.out.println(anInt);
//        }
        int[] arr3 = {12,23,45,67,89,98,100,120};
        int i = Arrays.binarySearch(arr3, 89);
        System.out.println(i);
        int[] arr4 = {12,23,45,67,89,98,100,120};
        int [] arr5 = arr4;
        boolean equals = Arrays.equals(arr3, arr4);
        System.out.println(equals);
    }
}
